import Login from "@/views/Login.vue";
import Layout from "@/views/Layout.vue";
import NotFound from "@/views/NotFound.vue";

export const baseRoute = [
  {
    name: "Login",
    path: "/login",
    component: Login,
    meta: { whiteList: true },
  },
  {
    name: "NotFound",
    path: "/404",
    component: NotFound,
    meta: { whiteList: true },
  },
];

export const dynamicRoutes = [
  {
    name: "Home",
    path: "/home",
    component: () => import("@/views/Home.vue"),
    meta: { id: 1 },
  },
  {
    name: "Layout",
    path: "/",
    component: Layout,
    children: [
      {
        name: "Table",
        path: "/table",
        component: () => import("@/views/table/index.vue"),
        meta: { id: 2 },
        children: [
          {
            name: "TableStripeTable",
            path: "/table/stripeTable",
            component: () => import("@/views/table/StripeTable.vue"),
          },
        ],
      },
    ],
  },
  {
    path: "/:pathMatch(.*)*",
    redirect: () => {
      return "/404";
    },
  },
];
